home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 980 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.4 KB

  1. Path: macshack.com!not-for-mail
  2. From: mikemc@macshack.com (Mike McCammant)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Serail Port Programming
  5. Date: 8 Jan 1996 14:25:30 -0500
  6. Organization: Mac's Shack - The "Whole Family" Internet Solution c/o macshack@randomc.com
  7. Message-ID: <4crr3a$eto@macshack.com>
  8. References: <4cgjij$lmk@newsbf02.news.aol.com> <4cpg6v$ao@newsserver.trl.OZ.AU>
  9. Reply-To: mikemc@macshack.com
  10. NNTP-Posting-Host: localhost.macshack.com
  11.  
  12. In article <4cpg6v$ao@newsserver.trl.OZ.AU>,
  13. Trevor Hand <t.hand@trl.oz.au> wrote:
  14. >In article <4cgjij$lmk@newsbf02.news.aol.com>,
  15. >   prestridge@aol.com (Prestridge) wrote:
  16. >>I am needing a good way of reading from an RS-232 serail port. I am using
  17.  
  18. >I am currently writing a class to test/manipulate the serial port.  At the 
  19. >momment though I am having some trouble getting a dialog box working - still 
  20. >haven't worked out what to use when "this" doesn't work! - once I solve this 
  21. >(no pun intended) it should be pretty well fixed.  I found a lot of 
  22. >information in a book titled "Using Turbo C++ 4.5" by Que, it has a chapter 
  23. >titled "Device I/O" and has a number of examples showing, quite clearly too, 
  24. >how to talk to the serial port.  Most of the functions used are in the Windows 
  25. >API, the book "Visual Basic Programmer's Guide to the Windows API" by Appleman 
  26. >is considered to be one of the best on the API subject, pretty easy to convert 
  27. >from VB to C.  My code does not read from the port, just sets up the settings 
  28. >and writes strings out.  If you would like some of my code that may be 
  29. >relevant to help you, let me know and I will send you some, probably 5 or 6 
  30. >pages though.  Reading from the port is pretty easy.
  31.  
  32.  
  33. Actually, for Windows, you have done the easy part. ;)
  34.  
  35. Under Windows, the hard part is getting the data from the port 
  36. in a reliable manner.  I spent weeks debugging my classes to get the 
  37. message handling etc working good enough for any decent communication.
  38.  
  39. I will be posting a notice here in a few days announcing the release of
  40. a communications object set for WIN16/VC++ v1.5x.  I have a few 
  41. things to tweek.
  42.  
  43.  
  44. -- 
  45. Mike - mikemc@macshack.com  -  Home of the JEO-Counter, graphic WWW counter
  46.  /---------------------------------------\   My opinions belong to me, 
  47. | Visit us at http://www.macshack.com     |  myself and I, not my employer,
  48.  \......................................./   the government or my wife...:)
  49.